package com.cloud.controller;

import org.springframework.util.StringUtils;
import org.springframework.web.bind.annotation.*;

/**
 * 支付控制层
 *
 * @author : z_sz
 * @date : 2020-06-05 13:54
 **/
@RestController
@RequestMapping("/pay")
public class PaymentController {

    @GetMapping("/payGoods")
    public String payGoods(@RequestParam("goodsName") String goodsName,@RequestParam("price") Double price) {
        if(StringUtils.isEmpty(goodsName) || 0 >= price) {
            return "参数异常";
        }
        return "够买："+goodsName+"成功，已支付金额："+price+"元;商店：8002";
    }

}
